package com.bky.agent.statical.impl;

import com.bky.agent.statical.TicketSubject;

/**
 * @Author shipeilei
 * @Date Created on 2018/5/11
 */
public class TrainStationProxy implements TicketSubject{
    private TrainStation trainStation;

    public TrainStationProxy(TrainStation trainStation) {
        this.trainStation = trainStation;
    }

    @Override
    public void sell() {
        System.out.println("欢迎光临!");
        //调用真实对象的方法，体现代理行为
        trainStation.sell();
        System.out.println("请交手续费!");
    }
}
